
/*
用户的函数和变量声明头文件
*/

#ifndef H_INCLUDES
#define H_INCLUDES

#include "esp_wifi.h"

//初始化wifi，，配网成功后直接重启--------------------------------------------
void initialise_wifi(void);
//从nvs中读取wifi配置
esp_err_t readWifiConfig(wifi_config_t *sta_config);
//socket任务-tcp_client
void tcp_client_task(void *pvParameters);

//智能配网的LED闪烁和按键相关的声明-------------------------------------------------
#define SmartconfigLed_GPIO      18         //LED标号18
#define ConnectStatusInterval    1000000    //单位为us
#define DisconnectStatusInterval 200000
//顶一个枚举类型，标志wifi连接的各种状态
typedef enum{
    wifi_discononet =1,
    wifi_connecting,
    wifi_connected,
}Wifi_Status_t;
void WifiStatus_LED_Init(void); //LED管脚初始化
void Delegate_Wifi_Disconnect_Status(Wifi_Status_t WifiState);  //通知网络未连接
void Delegate_Wifi_Connected_Status(Wifi_Status_t WifiState);   //通知网络已连接
void Delegate_Wifi_Connecting_Status(Wifi_Status_t WifiState);  //通知网络正在连接中
#define Button_GPIO      4         //按键的gpio标号号19
void Smartconfig_Button_Init(void); //智能配网按键初始化


#endif
